<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>

        <title><?php echo $title;?></title>

        <?php $this->load->view('head'); ?>
    </head>
    <body>
        <div id="layout">
            <div id="container" class="container_12">
                <!-- ======= .grid_12 - block begin ======= -->
                <div class="grid_12">
                    <?php if ($message != '') echo '<div class="alert info_msg">' . $message . '</div>'; ?>
                    <div class="box">
                        <div class="title"><span class="icon16_sprite i_trophy"></span><?php echo lang('registrarse'); ?></div>
                        <div class="inside">
                            <form id="form_id1" class="formee" method="post" action="<?php echo site_url('crud/registrar'); ?>">
                                <div class="in">
                                    <div class="grid-2-12"><label><?php echo lang('nombre_usuario');?>: <em class="formee-req">*</em></label></div>
                                    <div class="grid-4-12">
                                        <input value="<?php if(count($var_post) > 0) echo $var_post['username'];?>" class="validate[required,custom[username]]" type="text" name="username" id="username" />
                                        <span class="subtip"><?php echo lang('por_favor_inserte_un_nombre_de_usuario');?></span>
                                    </div>

                                    <div class="grid-2-12"><label><?php echo lang('nombre');?>: <em class="formee-req">*</em></label></div>
                                    <div class="grid-4-12">
                                        <input value="<?php if(count($var_post) > 0) echo $var_post['first_name'];?>" class="validate[required,custom[firstName]]" type="text" name="first_name" id="first_name" />
                                        <span class="subtip"><?php echo lang('nombre_completo_o_nombre_de_empresa');?></span>
                                    </div>
                                    <div class="clear"></div>
                                    <hr />

                                    <!-- ====================== -->

                                    <div class="grid-2-12"><label><?php echo lang('contrasena');?>: <em class="formee-req">*</em></label></div>
                                    <div class="grid-4-12">
                                        <input value="" class="validate[required,minSize[8]]" type="password" name="password" id="password" />
                                        <span class="subtip"><?php echo lang('contrasena_de_acceso_minimo_8_caracteres');?></span>
                                    </div>

                                    <div class="grid-2-12"><label><?php echo lang('contrasena_confirmar');?>: <em class="formee-req">*</em></label></div>
                                    <div class="grid-4-12">
                                        <input value="" class="validate[required,equals[password],minSize[8]]" type="password" name="password_confirm" id="password_confirm" />
                                    </div>
                                    <div class="clear"></div>
                                    <hr />
                                    <!-- ====================== -->
                                    
                                    <div class="grid-2-12"><label><?php echo lang('email');?>: <em class="formee-req">*</em></label></div>
                                    <div class="grid-4-12">
                                        <input value="<?php if(count($var_post) > 0) echo $var_post['email'];?>" class="validate[required,custom[email]]" type="text" name="email" id="email" />
                                    </div>

                                    <div class="grid-2-12"><label><?php echo lang('idioma');?>: <em class="formee-req">*</em></label></div>
                                    <div class="grid-4-12">
                                        <select name='idioma' id='idioma' class="validate[required]">
                                        <?php for($i = 0; $i < count($idiomas); $i++){?>
                                            <?php $seleccionado = "";?>
                                            <?php if(count($var_post) > 0) if($idiomas[$i] == $var_post['idioma']){ $seleccionado = "selected"; }else{ $seleccionado = ""; }?>
                                            <option value="<?php echo $idiomas[$i];?>" <?php echo $seleccionado;?>><?php echo lang($idiomas[$i]);?></option>
                                        <?php }?>
                                        </select>
                                        <span class="subtip"><?php echo lang('idioma_de_la_aplicacion');?></span>
                                    </div>
                                    <div class="clear"></div>
                                    <hr />
                                    <!-- ====================== -->
                                    
                                    <div class="grid-2-12"><label><?php echo lang('idiomas_que_dominas');?>: <em class="formee-req">*</em></label></div>
                                    <div class="grid-10-12">
                                        <ul class="formee-list">
                                            <li>
                                                <input name="p_idioma_esp" id="p_idioma_esp" type="checkbox" <?php if(isset($var_post['p_idioma_esp'])) echo "checked";?>/> 
                                                <label><?php echo lang('espanol'); ?></label>
                                            </li>
                                            <li>
                                                <input name="p_idioma_ing" id="p_idioma_ing" type="checkbox" <?php if(isset($var_post['p_idioma_ing'])) echo "checked";?>/> 
                                                <label><?php echo lang('ingles'); ?></label>
                                            </li>
                                            <li>
                                                <input name="p_idioma_ita" id="p_idioma_ita" type="checkbox" <?php if(isset($var_post['p_idioma_ita'])) echo "checked";?>/> 
                                                <label><?php echo lang('italiano'); ?></label>
                                            </li>
                                            <li>
                                                <input name="p_idioma_ale" id="p_idioma_ale" type="checkbox" <?php if(isset($var_post['p_idioma_ale'])) echo "checked";?>/> 
                                                <label><?php echo lang('aleman'); ?></label>
                                            </li>
                                            <li>
                                                <input name="p_idioma_fra" id="p_idioma_fra" type="checkbox" <?php if(isset($var_post['p_idioma_fra'])) echo "checked";?>/> 
                                                <label><?php echo lang('frances'); ?></label>
                                            </li>
                                            <li>
                                                <input name="p_idioma_por" id="p_idioma_por" type="checkbox" <?php if(isset($var_post['p_idioma_por'])) echo "checked";?>/> 
                                                <label><?php echo lang('portugues'); ?></label>
                                            </li>
                                            <li>
                                                <input name="p_idioma_nor" id="p_idioma_nor" type="checkbox" <?php if(isset($var_post['p_idioma_nor'])) echo "checked";?>/> 
                                                <label><?php echo lang('noruego'); ?></label>
                                            </li>
                                            <li>
                                                <input name="p_idioma_sue" id="p_idioma_sue" type="checkbox" <?php if(isset($var_post['p_idioma_sue'])) echo "checked";?>/> 
                                                <label><?php echo lang('sueco'); ?></label>
                                            </li>
                                        </ul>
                                        <span class="subtip"><?php echo lang('mensaje_idiomas_que_dominas');?></span>										
                                    </div>
                                    <div class="clear"></div>
                                    <hr />

                                    <!-- ====================== -->
                                    
                                    <div class="grid-4-12"><label><?php echo lang('demuestra_que_eres_humano');?>: <em class="formee-req">*</em></label></div>
                                    <div class="grid-8-12">
                                        <?php if(isset($recaptcha)) echo $recaptcha;?>
                                        <span class="subtip"><?php echo lang('escriba_las_dos_palabras');?></span>
                                    </div>
                                    <div class="clear"></div>
                                    <hr />
                                    
                                    <div class="grid-10-12"></div>
                                    <div class="grid-2-12"><input class="right button green" type="submit" value="<?php echo lang('registrar'); ?>"/></div>
                                    <div class="clear"></div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
                <!-- ======= .grid_12 - block end ======= -->
            </div><!-- End of #container -->
        </div><!-- End of #layout -->
        <div class="clear"></div>
        <?php $this->load->view('foot'); ?>
    </body>
</html>